/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package taikai;

import java.awt.Component;
import java.io.Serializable;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;

public class Prompt implements Serializable {

    private final OptionPane optionPane;
    private final ImageIcon teamIcon = new ImageIcon(getClass().getResource("resources/team.png"));

    public Prompt() {
        this(new OptionPaneImpl());
    }

    Prompt(OptionPane optionPane) {
        this.optionPane = optionPane;
    }

    String teamName(Component parent, int rowCount) {
        final char id = (char) ('A' + rowCount);
        return (String)optionPane.showInputDialog(parent, "Enter team name", "Team Name", JOptionPane.PLAIN_MESSAGE, teamIcon, null, "Team " + id);
    }

}
